package com.hgw.Demo01_ChainOfResponsibilityPattern.Exercises16_8_6;

/**
 * Data time:2021/12/16 16:27
 * StudentID:2019112118
 * Author:hgw
 * Description: 经历类，充当具体处理者
 */
public class GeneralManager extends Handler{
    public GeneralManager(String name) {
        super(name);
    }
    @Override
    public void handleLeave(LeaveRequest leave) {
        if (leave.getNum() <30 ) {
            System.out.println("总经理：" + this.getName() + "批准了：" + leave.getName()
                    +"因" + leave.getContent() + ",请的:" + leave.getNum()+"天假");
        } else {
            System.out.println("收拾一下东西，你被开除！");
        }
    }
}
